home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / comm / net / LT_UNIX255.lha / Extras / arit.sh next >
Text File  |  1997-04-16  |  517b  |  35 lines

  1. a1="";a2="";c="";resul="";dd=""
  2. ff="";reset timer
  3. _inicio
  4. if ff=>20
  5.    echo
  6.    timer
  7.    echo
  8.    ex a1,a2,c,resul,dd,ff
  9.    exit
  10. fi
  11. rnd -o 10;attrib a1
  12. rnd -o 10;attrib a2
  13. rnd -o 1;attrib c
  14. a1=a1--" "
  15. a2=a2--" ";c=c--" "
  16. if c=0
  17.    echo -a " ${a1} + ${a2} = "
  18.    dd=${a1}
  19.    dd=dd+${a2}
  20. else
  21.    echo -a " ${a1} - ${a2} = "
  22.    dd=${a1}
  23.    dd=dd-${a2}
  24. fi
  25. input ;
  26. attrib resul
  27. if resul=dd
  28.    echo " [ CERTO ]"
  29.    ff=ff+1
  30.    goto inicio
  31. else
  32.    echo " [ ERRADO ] - ${dd}"
  33.    goto inicio
  34. fi
  35.